package top.rushpeak.edu03.admin.web;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;

import com.jfinal.core.Controller;



public class BaseController extends Controller {

	public static final Logger		LOG					= Logger.getLogger(BaseController.class);
	

	
	@SuppressWarnings("rawtypes")
	protected Map<String, Object> buildPagination(List list, Integer count) {
		return buildPagination(list, count, null);
	}
	
	@SuppressWarnings("rawtypes")
	protected Map<String, Object> buildPagination(List list, Integer count,
													List<Map<String, Object>> footer) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("total", count);
		map.put("rows", list);
		if (footer != null)
			map.put("footer", footer);
		return map;
	}
	
}
